#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#include "matrix_improved.h"

int main( int argc, char **argv ) {
	
	if( argc!=4 ) {
			printf(
				"usage: %s <file A> <file B> <file C>\n"
				"  loads both A and B and stores the product in C\n",
				argv[0]);
			exit(1);
	}

	matrix_t *a = load_matrix( argv[1] );
	matrix_t *b = load_matrix( argv[2] );

	time_t begin = time(NULL);
	matrix_t *c = multiply_matrix( a, b );
	time_t end = time(NULL);

	printf("The multiplication costs: %f\n", difftime(end, begin));

	store_matrix( c, argv[3] );

	free_matrix(a);
	free_matrix(b);
	free_matrix(c);
	return 0;
}       

// vim:ts=4
